import Vue from "vue";
import VueRouter from "vue-router";
// const Home = () => import("../views/Home");
import Home from "../views/Home";
import Albums from "../views/Albums";
import Recommend from "../views/Recommend";
import Catalogs from "../views/Catalogs";

// const Home = () => import("../views/Home");
// const Albums = () => import("../views/Albums");
// const Recommend = () => import("../views/Recommend");
// const Catalogs = () => import("../views/Catalogs");
Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/home"
  },
  {
   path:"/home",
   name:"home",
   component:Home,
   redirect:"/home/recommend",
   children:[
      {
        path:"albums",
        component:Albums
      },{
        path:"recommend",
        component:Recommend
      },{
        path:"catalogs",
        component:Catalogs
      }
   ]
  }
];

const router = new VueRouter({
  routes
});

export default router;
